package com.zzu.team.controller;


import com.zzu.team.entity.Admin;
import com.zzu.team.entity.ReturnBean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin")
public class AdminController extends BaseController{

    @PostMapping("login")
    public ReturnBean loginAdmin(@RequestBody Admin admin){
        if (admin.getName().equals("admin") && admin.getPwd().equals("admin")) return success("登陆成功");
        return super.fail("用户名或密码错误");
    }
}
